import dayjs from 'dayjs';

// 格式化时间
export const useFormatTime = (
  time: any,
  fmt = 'YYYY-MM-DD HH:mm:ss',
): string => {
  let t = time;
  if ((time + '').length < 13) {
    t += '000';
  }
  console.log(t);
  t = parseInt(t, 10);
  return dayjs(t).format(fmt);
};
